﻿@using BabyShop.Site.ViewModels
@model ProductTypeSortsViewModel

@if (Model == null) { return; }
<div id="sortlist" class="m">
    <div class="mt">
        <h2>@Model.CurrentProductType.ProductTypeName</h2>
    </div>
    <div class="mc">
    @if (Model.CurrentProductType.ChildProductTypes != null) {
        foreach (var childProductType in Model.CurrentProductType.ChildProductTypes) {
            <div class="item current">
                <h3>
                    @Html.ActionLink(childProductType)
                </h3>
                @if (childProductType.ChildProductTypes != null) {
                    <ul>
                    @foreach (var thirdProductType in childProductType.ChildProductTypes) {
                    <li>
                        @Html.ActionLink(thirdProductType)
                    </li>
                    }
                    </ul>
                }
            </div>
        }
    }
    </div>
</div>
